macos: place above transient-for when presenting
authorChristian Hergert <chergert@redhat.com>
Wed, 2 Dec 2020 18:20:07 +0000 (10:20 -0800)
committerChristian Hergert <chergert@redhat.com>
Wed, 2 Dec 2020 18:21:16 +0000 (10:21 -0800)
We need to re-attach to the transient-for window whenever we present or
we risk getting placed behind the window by the display server. Apparently
that setting does not persist across a hide of the NSWindow.

gdk/macos/gdkmacostoplevelsurface.c

index 05d88ba94ff00df6566b9e4ad91a5bc6b54569e9..7af4725b35d190d2f67545ad31e7425faa522041 100644 (file)
@@ -100,6 +100,8 @@ _gdk_macos_toplevel_surface_present (GdkToplevel       *toplevel,
   g_assert (GDK_IS_MACOS_TOPLEVEL_SURFACE (self));
   g_assert (GDK_IS_MACOS_WINDOW (nswindow));
 
+  _gdk_macos_toplevel_surface_attach_to_parent (self);
+
   style_mask = [nswindow styleMask];
 
   monitor = gdk_display_get_monitor_at_surface (display, surface);